package com.example.pluginmanager.util;

import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.digest.MD5;

import java.util.Random;

public class RandomUtil {
    public static String randomString(){
        Random rand = new Random();
        StringBuilder stringBuilder = new StringBuilder();
        for(int i=0; i<5; i++) {
            stringBuilder.append(rand.nextInt(10));
        }
        return stringBuilder.toString();
    }


    public static String getMd5String(String value){
        MD5 md51 = SecureUtil.md5();
        String s1 = md51.digestHex(value);
        return s1;
    }
}
